#ExtDNVoice- voice, ExtDNAM - am, ExtDNFax - fax, ExtDNNoAnswer - no answer, ExtDNBusy - busy
import random
def cpd_transfer_load():
  max1 = 10
  max2 = 10
  i = 0
  while 0 < max1:
    j = 0
    while j < max2: #??
      try:
        dest = random.choice([ExtDNVoice, ExtDNAM, ExtDNFax, ExtDNNoAnswer, ExtDNBusy])
        CPD1.CPDMakePredictiveCall(dest, waitEvents = 0)
      except KeyboardInterrupt:
        print "STOP"
        return
      j = j + 1
    CPDServer.WaitAllEvents()
    LocalTserver.WaitAllEvents()
    i = i + 1
    time.sleep(10)